<?php
include_once("../../service/categoryService.php");
error_reporting(0);
$cateParentId = $_GET["cateId"];
if($_GET["cateId"] == ""){
    $cateParentId = 0;
}else{
    $cateParentId = $_GET["cateId"];
}
$attrs = getAvailableAttributeOfCategory(0,$cateParentId);

$last = mysql_num_rows($attrs);
$runner = 1;
while($attr = mysql_fetch_array($attrs)){
    echo $attr["ATT_ID"] . "@" .$attr["ATT_NAME"]."@";
    if(isAttDeleteTable($attr["ATT_ID"])){
        echo "1";
        //echo "<a onclick='deleteAtt(".$attr["ATT_ID"].",$(this));'>X</a>";
    }else{
        echo "0";
    }
    if($runner < $last){
        echo ";";
    }
    $runner++;
}
?>
